package api

import (
	"encoding/json"
	"net/http"

	"rt.com/mocktool/mock"
)

// loadMethodDetail 加载Mock方法详情
func loadMethodDetail(w http.ResponseWriter, r *http.Request) {
	debugAPI(w, r)
	urlParams := r.URL.Query()
	methodID := urlParams.Get("methodID")
	method := mock.Instance.MethodList[methodID]
	result, _ := json.Marshal(method)
	w.Write(result)
}
